-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[clang] Refactor to remove clangDriver dependency from clangFrontend and flangFrontend #165277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
65b3857 to
49db4fc
Compare
49db4fc to
6380c54
Compare
|
Note: Linux AArch64 CI is currently having trouble (failing everywhere), which is why this isn't passing all checks. |
7dd2dd8 to
cc10a13
Compare
|
I've tested this with |
flang/lib/Frontend/CMakeLists.txt
Outdated
|
|
||
| CLANG_LIBS | ||
| clangBasic | ||
| clangDriver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading the title of the patch I was hoping that you could remove the clangDriver dependency from flangFrontend as well. Any reason you could not remove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, and thanks for pointing that out!
…ns library This change moves option-related code from clangDriver into a new clangOptions library. This refactoring is part of a broader effort to support driver-managed builds for compilations using C++ named modules and/or Clang modules. It is required for linking the dependency scanning tooling against the driver without introducing cyclic dependencies, which would otherwise cause build failures when dynamic linking is enabled. In particular, clangFrontend must no longer depend on clangDriver for this to be possible. This PR is motivated by the following review comment: llvm#152770 (comment)
This PR removes the clangDriver dependency from clangFrontend. The goal of this change is to remove dependencies on the Driver. This refactoring is part of a broader effort to support driver-managed builds for compilations using C++ named modules and/or Clang modules. It is required for linking the dependency scanning tooling against the driver without introducing cyclic dependencies, which would otherwise cause build failures when dynamic linking is enabled. In particular, clangFrontend must no longer depend on clangDriver for this to be possible. This change is motivated by the following review comment: llvm#152770 (comment)
e978ccd to
080ace2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the changes in flang as well. Those LGTM.
Since the majority of the changes are in clang, I'll defer to someone from there to approve.
|
[EDIT] Just noticed the typo in the title:
|
This removes the dependency on
clangDriverfromclangFrontendandflangFrontendThis refactoring is part of a broader effort to support driver-managed builds for compilations using C++ named modules and/or Clang modules.
It is required for linking the dependency scanning tooling against the driver without introducing cyclic dependencies, which would otherwise cause build failures when dynamic linking is enabled.
In particular,
clangFrontendmust no longer depend onclangDriverfor this to be possible.This change is motivated by the following review comment: #152770 (comment)